package com.gxsf.wechatbook.pojo;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author BeijiRonin
 * @version 1.0.0
 * @date 2021/1/18 17:34
 */
@Data
@Entity
@ApiModel("用户")
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long id;
    @Column(length = 11)
    public long phone;
    @ApiModelProperty("积分")
    public long scope = 100;
    @Column(length = 32)
    public String password;
    public String avatar = "G:/library/photo/xhr.jpg";
    @ApiModelProperty("昵称")
    public String name;
    @ApiModelProperty("真实姓名")
    public String realName;
    @ApiModelProperty("专业")
    public String college;
    @CreatedDate
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp createTime;
    @LastModifiedBy
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp updateTime;
}
